Skip to content

docs: Document jest's transformIgnorePatterns option to avoid pitfall #3523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 10, 2019

Conversation

LinusBorg
Copy link
Member

I found that many people have issues running tests with jest, receiving an error like "unexpected token "import".

The most common reason - as far as I can tell - are packages in their node_modules that contain untranspiled ES6 imports.

While we offer the transpileDependencies option, jest doesn't respect it, and rightfully so, since the issues solved by that option are often different ones (transpiling for browser compatibility).

Instead, people have to adjust jest's transformIgnorePatters option when one of the packages they use has to be transformed by babel-jest or vue-jest.

to transpileDependencies docs
with default value.

Allows easier customisation when exceptions have to be added.
@LinusBorg LinusBorg force-pushed the LinusBorg-patch-jest-transpile-docs branch from dceb8ce to 826d1ff Compare February 26, 2019 18:59
@LinusBorg LinusBorg changed the title docs: Document jest's tranformIgnorePatters option to avoid pitfall docs: Document jest's tranformIgnorePatterns option to avoid pitfall Feb 26, 2019
@LinusBorg LinusBorg changed the title docs: Document jest's tranformIgnorePatterns option to avoid pitfall docs: Document jest's transformIgnorePatterns option to avoid pitfall Feb 26, 2019
@LinusBorg LinusBorg self-assigned this Mar 6, 2019
@LinusBorg
Copy link
Member Author

LinusBorg commented Mar 6, 2019

Don't merge yet.

Will undo the unnecessary formatting changes that my editor did.

@LinusBorg
Copy link
Member Author

Should be good now. Jeeeeez....

@LinusBorg LinusBorg removed their assignment Mar 8, 2019
@haoqunjiang haoqunjiang merged commit d23e728 into dev Mar 10, 2019
@LinusBorg LinusBorg deleted the LinusBorg-patch-jest-transpile-docs branch May 3, 2019 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants